package mes.kanban.vo;

import java.io.Serializable;
import java.util.List;

import mes.kanban.entity.MesPermission;
import mes.kanban.entity.MesRole;

/**
 * user 辅助类
 * 
 * @author gjy
 *
 *         2018年2月11日下午2:31:40
 */
public class MesUserVO implements Serializable {

	private static final long serialVersionUID = -449580301858962230L;

	private String id;

	/**
	 * 用户工号
	 */
	private String userCode;

	/**
	 * 用户名称
	 */
	private String userName;

	/**
	 * 用户密码
	 */
	private String passWord;

	/**
	 * 用户职称
	 */
	private String jobLevel;

	/**
	 * 用户部门（存储部门DEPT的ID）
	 */
	private String userDeptId;

	private String userDeptName;

	/**
	 * 用户邮箱
	 */
	private String email;

	/**
	 * 用户手机
	 */
	private String phone;

	/**
	 * 用户手机(1:生效 -1:失效)
	 */
	private Integer status;

	/**
	 * 安全验证用
	 */
	private String salt;

	/**
	 * 角色
	 */
	private List<MesRole> roles;

	/**
	 * 权限
	 */
	private List<MesPermission> permissions;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUserCode() {
		return userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassWord() {
		return passWord;
	}

	public void setPassWord(String passWord) {
		this.passWord = passWord;
	}

	public String getJobLevel() {
		return jobLevel;
	}

	public void setJobLevel(String jobLevel) {
		this.jobLevel = jobLevel;
	}

	public String getUserDeptId() {
		return userDeptId;
	}

	public void setUserDeptId(String userDeptId) {
		this.userDeptId = userDeptId;
	}

	public String getUserDeptName() {
		return userDeptName;
	}

	public void setUserDeptName(String userDeptName) {
		this.userDeptName = userDeptName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getSalt() {
		return salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

	public List<MesRole> getRoles() {
		return roles;
	}

	public void setRoles(List<MesRole> roles) {
		this.roles = roles;
	}

	public List<MesPermission> getPermissions() {
		return permissions;
	}

	public void setPermissions(List<MesPermission> permissions) {
		this.permissions = permissions;
	}

	/**
	 * 重新对盐重新进行了定义，员工号+salt，这样就更加不容易被破解 密码盐.
	 * 
	 * @return
	 */
	public String getCredentialsSalt() {
		return this.userCode + this.salt;
	}
	

}
